﻿<!--
	@create by 
	@update by 
	@description 
-->
<div>
	<el-form-q :field-data="queryFields" :buttons="queryButtons"></el-form-q>
  <div class="yu-toolBar">
    <el-button-group>
      <el-button icon="plus" @click="addFn" v-if="checkPermission('create')">新增</el-button>
      <el-button icon="edit" @click="modifyFn" v-if="checkPermission('edit')">修改</el-button>
      <el-button icon="document" @click="infoFn" v-if="checkPermission('detail')">查看</el-button>
      <el-button icon="yx-bin" @click="deleteFn" v-if="checkPermission('delete')">删除</el-button>
    </el-button-group>
    <el-button-group style="margin-left: 10px">
      <el-button icon="edit" @click="setStatusFn('1')" v-if="checkPermission('edit')">生效</el-button>
      <el-button icon="edit" @click="setStatusFn('2')" v-if="checkPermission('edit')">失效</el-button>
    </el-button-group>
  </div>
  <el-table-x ref="reftable" :row-index="true"  :base-params="baseParams"
        :data-url="reftableDataUrl" :table-columns="tableColumns" :request-type="'POST'"></el-table-x>
  <!-- 说明dialog可配置宽高属性，若不配置则宽度默认为屏幕50%，高度自适应
     width="650px" height="380px" -->
  <el-dialog :title="viewTitle[viewType]" :visible.sync="dialogVisible" size="large">
    <el-form-x ref="reform"
           :group-fields="updateFields"
           :disabled="formDisabled" label-width="135px"></el-form-x>
    <el-button-group>
      <el-button icon="plus" @click="addDtlFn" v-show="dtlAddButtonVisible">新增</el-button>
      <el-button icon="edit" @click="editDtlFn"  v-show="dtlEditButtonVisible">修改</el-button>
      <el-button icon="document" @click="infoDtlFn" v-show="dtlDtlButtonVisible">查看</el-button>
      <el-button icon="plus" @click="delDtlFn" v-show="dtlDelButtonVisible">删除</el-button>
    </el-button-group>
    <el-table-x ref="dtltable" :row-index="true"  :base-params="detail.dtlParams" :pageable="pageable"
                :data-url="detail.dtlDataUrl" :table-columns="detail.dtltableColumns" :request-type="'POST'" :default-load="false"></el-table-x>
    <div style="text-align: center;">
      <el-button type="primary" icon="plus" @click="saveFn(false)"  v-show="dtlSaveVisible">保存</el-button>
      <el-button type="primary" icon="plus" @click="saveFn(true)"  v-show="dtlSaveVisible">提交</el-button>
      <el-button type="primary" icon="edit" @click="cancelDtlFn">返回</el-button>
    </div>
  </el-dialog>
  <el-dialog title="利率明细" :visible.sync="addDtlVisible" v-if="addDtlVisible">
    <el-form-x ref="dtlForm"
               :group-fields="detail.updateDtlFields" :buttons="detail.updateDtlButtons" :disabled="dtlFormDisabled"
               label-width="150px"></el-form-x>

  </el-dialog>
</div>
